package com.example.test.springdemo.domain;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.util.Date;

@ApiModel(value = "3.2.1 后台日志记录表")
public class AdminOperationLog implements Serializable {
    @ApiModelProperty(value = "主键",dataType = "Long")
    private Long id;

    @ApiModelProperty(value = "用户名",dataType = "String")
    private String username;

    @ApiModelProperty(value = "用户操作",dataType = "String")
    private String operation;

    @ApiModelProperty(value = "请求方法",dataType = "String")
    private String method;

    @ApiModelProperty(value = "请求参数",dataType = "String")
    private String params;

    @ApiModelProperty(value = "执行时长(毫秒)",dataType = "Long")
    private Long time;

    @ApiModelProperty(value = "请求的ip地址",dataType = "String")
    private String ip;

    @ApiModelProperty(value = "创建时间",dataType = "Date")
    private Date gmtCreateTime;

    private static final long serialVersionUID = 1L;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getOperation() {
        return operation;
    }

    public void setOperation(String operation) {
        this.operation = operation;
    }

    public String getMethod() {
        return method;
    }

    public void setMethod(String method) {
        this.method = method;
    }

    public String getParams() {
        return params;
    }

    public void setParams(String params) {
        this.params = params;
    }

    public Long getTime() {
        return time;
    }

    public void setTime(Long time) {
        this.time = time;
    }

    public String getIp() {
        return ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }

    public Date getGmtCreateTime() {
        return gmtCreateTime;
    }

    public void setGmtCreateTime(Date gmtCreateTime) {
        this.gmtCreateTime = gmtCreateTime;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", username=").append(username);
        sb.append(", operation=").append(operation);
        sb.append(", method=").append(method);
        sb.append(", params=").append(params);
        sb.append(", time=").append(time);
        sb.append(", ip=").append(ip);
        sb.append(", gmtCreateTime=").append(gmtCreateTime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}
